<template>
    <div class="indexcontent">
        <pageHeader ref="header" :showRoof="false" :isLoginPage="true"></pageHeader>
        <div class="loginpage">
            <div class="loginpage-wrap">
                <div class="loginpage-main">
                    <div class="clearfix loginpage-hd">
                        <div class="loginpage-hdl" @click="logintype(1)">用户登录</div>
<!--                        <div class="loginpage-hdr" @click="logintype(2)">CA登录</div>-->
                    </div>
                    <div class="loginpage-bd" v-if="loginModel">
                        <div class="loginpage-inpgroup">
                            <img src="@/assets/images/login-icon1.png" alt="">
                            <input type="text" placeholder="手机号/用户名">
                        </div>
                        <div class="loginpage-inpgroup">
                            <img src="@/assets/images/login-icon2.png" alt="">
                            <input type="password" placeholder="登录密码">
                        </div>
                    </div>
<!--                    <div class="loginpage-bd" v-if="!loginModel">-->
<!--                        <div class="loginpage-inpgroup">-->
<!--                            <img src="@/assets/images/login-icon2.png" alt="">-->
<!--                            <input type="password" placeholder="登录密码">-->
<!--                        </div>-->
<!--                    </div>-->
                    <div class="loginpage-errtips" v-if="showerrtips"><img src="@/assets/images/erricon.png" alt="">{{errtips}}</div>
                    <button type="button" class="loginbtn" :style="{marginTop:showerrtips?'15px':'25px'}" @click="tapLogin">立即登录</button>
                    <div class="clearfix loginpage-ft" :style="{marginTop:showerrtips?'15px':'25px'}">
                        <router-link tag="div" :to="{name:'Forgetpass'}" class="loginpage-desl">忘记密码</router-link>
                        <router-link tag="div" :to="{name:'Register'}" class="loginpage-desr">用户注册</router-link>
                    </div>
                </div>
            </div>
        </div>
        <pageFooter/>
    </div>
</template>

<script>
    import pageHeader from '@/components/pageHeader'
    import pageFooter from '@/components/pageFooter'

    import {mapMutations} from 'vuex'

    export default {
        components: {
            pageHeader,
            pageFooter
        },
        data() {
            return {
                loginModel: true,
                errtips:'',
                showerrtips:false
            }
        },
        created() {

        },
        computed: {},

        mounted() {

        },
        methods: {
            logintype(type) {
                if (type == 1) {
                    this.loginModel = true
                } else {
                    this.loginModel = false
                }
            },
            tapLogin(){
                this.$router.push({
                    name:'Ordersign'
                })
            },
        }
    }
</script>

<style scoped>

</style>
